package com.example.javabasic.gc;

import java.util.HashMap;
import java.util.Map;

/**
 * 垃圾回收
 */
public class TestGc {
    public static void main(String[] args) {
        TestGc gc = new TestGc();
        int i = gc.hashCode();
        System.out.println(i);
        String s1 = "Aa";
        String s2 = new String("BB");
        System.out.println(s1.hashCode());
        System.out.println(s2.hashCode());

        Map<String,String> map = new HashMap<>();
        map.put(s1,"AA");
        map.put(s2,"Bb");
        int h;
         int  n = (gc == null) ? 0 : (h = gc.hashCode()) ^ (h >>> 16);
        System.out.println(n);
    }

}
